package com.ruoyi.asset.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 资产工单对象 asset_flow
 * 
 * @author yepanpan
 * @date 2024-12-20
 */
@Data
public class AssetFlow extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    public static final String STATUS_UN_SUBMIT = "0"; //未提交（草稿）
    public static final String STATUS_CHECK = "1"; //审核中
    public static final String STATUS_UN_OUT = "2"; //未出库
    public static final String STATUS_UN_IN = "5"; //未入库
    public static final String STATUS_OUT = "3"; // 已出库
    public static final String STATUS_REVERT = "4"; //已归还
    public static final String STATUS_SCRAP = "9"; //已作废
    public static final String STATUS_DONE = "6"; //已完成

    public static final String TYPE_PURCHASE = "purchase";
    public static final String TYPE_MAINTAIN = "maintain";

    /** 自增长主键ID */
    private Long id;

    /** 工单类别 */
    @Excel(name = "流程类型")
    private String typeName;
    private Long typeId;
    private String typeCode;
    private AssetFlowType type;

    /** 单号 */
    @Excel(name = "单号")
    private String num;

    /** 资产分类 */
    @Excel(name = "资产分类")
    private String cateName;
    private Long cateId;

    /** 资产ID */
    @Excel(name = "资产编码")
    private String assetNum;
    private Long assetId;

    /** 申请部门 */
    @Excel(name = "申请部门")
    private String deptName;
    private Long deptId;

    /** 申请人 */
    @Excel(name = "申请人")
    private String userName;
    private Long userId;

    /** 申请数量 */
    @Excel(name = "申请数量")
    private Integer amount;
    @Excel(name = "单价")
    private BigDecimal price;

    /** 申请原由 */
    @Excel(name = "申请原由")
    private String reason;

    /** 申请说明 */
    @Excel(name = "申请说明")
    private String content;

    /** 审核结果 */
    @Excel(name = "审核结果", dictType = "flow_check_result", comboReadDict = true)
    private String checkStatus;

    /** 流程进度 */
    @Excel(name = "流程进度")
    private String flowStatus;

    /** 申请时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date applyTime;

}
